package com.order.untils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

public class RandomNum {
    public static int getRandomNum(){
        Random r = new Random();
        return r.nextInt(900000)+100000;//(int)(Math.random()*999999)
    }
    public static long getTime(){
        long a = new Date().getTime();
        return a;
    }

    public static void main(String[] args) {
        Date currentTime = new Date();
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String dateString = formatter.format(currentTime);
        System.out.println(dateString);

    }
}
